package com.anclick.englishword;

import java.util.Dictionary;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

/**
 * EnglishWord 메인 Activity
 * 
 * com.anclick.englishword
 * EnglishWord.java
 *
 * @author junhwan_kim
 * @date 2011. 6. 13. 오전 10:37:42
 * @Version
 */
public class MainActivity extends Activity {
	
    /**
     * Splash Activity 띄우기
     * 
     * 
     * @see android.app.Activity#onCreate(android.os.Bundle)
     * @Method onCreate
     * @param savedInstanceState
     *
     * @author junhwan_kim
     * @date 2011. 6. 13. 오전 10:38:04
     */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        /// Splash(로딩화면) 띄우기, junhwan_kim, 2011.06.13
        startActivity(new Intent(this, SplashActivity.class));
        
        findViewById(R.id.btnStudyWord).setOnClickListener(mClickListener);
        findViewById(R.id.btnScore).setOnClickListener(mClickListener);
        findViewById(R.id.btnWordList).setOnClickListener(mClickListener);
        findViewById(R.id.btnSettings).setOnClickListener(mClickListener);
        findViewById(R.id.btnDictionary).setOnClickListener(mClickListener);
        findViewById(R.id.btnHelp).setOnClickListener(mClickListener);
    }
    
    Button.OnClickListener mClickListener = new Button.OnClickListener() {
		public void onClick(View v) {
			switch (v.getId()) {
			case R.id.btnStudyWord:
				startActivity(new Intent(MainActivity.this, SelectDayActivity.class));
				break;
			case R.id.btnScore:
				startActivity(new Intent(MainActivity.this, ScoreActivity.class));
				break;
			case R.id.btnWordList:
				startActivity(new Intent(MainActivity.this, WordListActivity.class));
				break;
			case R.id.btnSettings:
				startActivity(new Intent(MainActivity.this, SettingsActivity.class));
				break;
			case R.id.btnDictionary:
				startActivity(new Intent(MainActivity.this, DictionaryActivity.class));
				break;
			case R.id.btnHelp:
				startActivity(new Intent(MainActivity.this, HelpActivity.class));
				break;
			}
		}
    };
}